import { useEffect,useState } from 'react'
import MyComponent from './MyComponent'

function App() {
  const [satisfactionLeve,setSatisfactionLeve] = useState(301)
  console.log('App更新了')
  useEffect(() => {
    setTimeout(() => {
      setSatisfactionLeve(301)
    },3000)
  },[])
  return (
    <div>
      {satisfactionLeve}
      <input  
        type="range"
        min='0'
        max='500'
        value={satisfactionLeve}
        onChange={(event) => setSatisfactionLeve(event.target.value)}
      />
      <MyComponent level={satisfactionLeve}/>
    </div>
  )
}

export default App
